<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>教师登录 - 测试用例生成系统</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/login.css') }}">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar-modern">
        <div class="container">
            <a class="navbar-brand-modern" href="/">
                <span class="fa fa-code"></span>
                测试用例生成系统
            </a>
            <div class="navbar-nav-modern">
                <a class="nav-link-modern" href="/">首页</a>
                <a class="nav-link-modern" href="/teacher">测试用例管理</a>
            </div>
        </div>
    </nav>

    <!-- 登录表单 -->
    <div class="login-container">
        <div class="login-card">
            <div class="login-header">
                <h2><span class="fa fa-user"></span> 教师登录</h2>
                <p>请输入您的用户名和密码</p>
            </div>
            
            <form id="loginForm" class="login-form">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" id="username" name="username" required 
                           placeholder="请输入用户名" autocomplete="username">
                </div>
                
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" id="password" name="password" required 
                           placeholder="请输入密码" autocomplete="current-password">
                </div>
                
                <div class="form-group">
                    <label class="checkbox-label">
                        <input type="checkbox" id="rememberMe" name="rememberMe">
                        <span class="checkmark"></span>
                        记住我
                    </label>
                </div>
                
                <button type="submit" class="btn btn-primary btn-login">
                    <span class="fa fa-sign-in"></span>
                    登录
                </button>
            </form>
            
            <div class="login-footer">
                <div class="alert alert-info">
                    <span class="fa fa-info-circle"></span>
                    <strong>默认管理员账号：</strong><br>
                    用户名：admin<br>
                    密码：admin123<br>
                    <small>请首次登录后立即修改密码</small>
                </div>
            </div>
        </div>
    </div>

    <!-- 错误提示模态框 -->
    <div id="errorModal" class="modal" style="display: none;">
        <div class="modal-content">
            <div class="modal-header">
                <h3><span class="fa fa-exclamation-triangle"></span> 登录失败</h3>
                <span class="close">&times;</span>
            </div>
            <div class="modal-body">
                <p id="errorMessage"></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" onclick="closeErrorModal()">确定</button>
            </div>
        </div>
    </div>

    <script src="{{ url_for('static', filename='js/login.js') }}"></script>
</body>
</html>
